﻿using System;
using System.Collections;

namespace ConsoleApp5
{
    class Program
    {
        static void Main(string[] args)
        {
            Queue queue = new Queue();
            queue.Enqueue("小张");
            queue.Enqueue("小李");
            queue.Enqueue("小刘");
            Console.WriteLine("购票开始："); 
            while (queue.Count != 0) {
                Console.WriteLine(queue.Dequeue() + "已购票！");
            }
            Console.WriteLine("购票结束！");




            Queue queue1 = new Queue();
            queue1.Enqueue("aaa");
            queue1.Enqueue("bbb");
            queue1.Enqueue("ccc");
            object[] obj = queue1.ToArray();
            foreach (var v in obj)
            {
                Console.WriteLine(v);
            }
        }
    }
}
